package com.agri.result;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 统一返回码定义
 */
@Getter
@AllArgsConstructor
public enum ResultCode {
    SUCCESS(200, "成功"),
    BAD_REQUEST(400, "请求参数错误"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    NOT_FOUND(404, "资源不存在"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误"),

    // 业务错误码
    FINANCING_APPLY_FAILED(1001, "融资申请失败"),
    FINANCING_AUDIT_FAILED(1002, "融资审批失败"),
    FINANCING_STATUS_INVALID(1003, "融资状态无效");

    private final int code;
    private final String message;
}